package com.skivingcloud.security.conf;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component;

@Component
@Configuration
public class PasswordConfig {
    //自定义加密方式
    @Bean("passwordEncoderDefault")
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }
}
